using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class JobSeekers_experience : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session.Contents["jsuserid"] == null)
        {
            Response.Redirect("login.aspx");
        }
    }
    
    protected void btnNext_Click(object sender, EventArgs e)
    {
        Response.Redirect("skills.aspx");
    }
    protected void btnMore_Click(object sender, EventArgs e)
    {
        SQLServerClass cls = new SQLServerClass();
        if (!cls.AddNewUpdateExperience("0",
        Convert.ToString(Session.Contents["jsuserid"]),
        txtCompany.Text, txtAddress.Text,
        ddlCountry.SelectedValue,
        ddlDepartment.SelectedValue,
        txtSummary.Text,
        txtPosition.Text,
        txtFrom.Text, txtTo.Text,
        txtSalary.Text,
        txtDescription.Text))
            literalError.Text = "Error: " + cls.ErrorMessage;
        else
            Response.Redirect("experience.aspx");
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        SQLServerClass cls = new SQLServerClass();
        if (!cls.AddNewUpdateExperience("0",
        Convert.ToString(Session.Contents["jsuserid"]),
        txtCompany.Text, txtAddress.Text,
        ddlCountry.SelectedValue,
        ddlDepartment.SelectedValue,
        txtSummary.Text,
        txtPosition.Text,
        txtFrom.Text, txtTo.Text,
        txtSalary.Text,
        txtDescription.Text))
            literalError.Text = "Error: " + cls.ErrorMessage;
        else
            Response.Redirect("skills.aspx");
    }
}
